package free.grnadav.jquerymobilegwt.client.button;


public class HeaderButton extends Button {

	public enum HeaderButtonPosition {
		LEFT ("ui-btn-left"),
		RIGHT ("ui-btn-right");
		
		public final String jqmDataString;
		HeaderButtonPosition(String jqmDataString) {
			this.jqmDataString = jqmDataString;
		}
	}

	private HeaderButtonPosition position;
	private boolean isBackButton = false;
	
	public void setHeaderButtonPosition(HeaderButtonPosition position) {
		this.position = position;
		this.button.getElement().addClassName(position.jqmDataString);
	}
	
	public HeaderButtonPosition getHeaderButtonPosition() {
		return position;
	}

	public boolean isBackButton() {
		return isBackButton;
	}

	public void setBackButton(boolean isBackButton) {
		this.isBackButton = isBackButton;
		this.button.getElement().setAttribute("data-rel","back");
	}
	
	
}
